﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace Bottle.CommunityForum.UIPortal.Models
{
    /// <summary>
    /// 自定义全局异常过渡器
    /// 发生异常自动调用
    /// </summary>
    public class MyExceptionFilterAttribut: HandleErrorAttribute
    {
        public override void OnException(ExceptionContext filterContext)
        {
            //直接将异常写入到日志里
            Common.LogHelper.WriteLog(filterContext.Exception.ToString());

            base.OnException(filterContext);
        }
    }
}